package com.smm.imgServer.dao.impl;

import com.smm.imgServer.dao.MongodbDao;
import com.smm.imgServer.domain.ImageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.CriteriaDefinition;
import org.springframework.data.mongodb.core.query.Query;

import java.util.List;

/**
 * Created by tangshulei on 2016/1/29.
 */
public abstract class MongodbDaoImpl<T> implements MongodbDao<T> {

    @Autowired
    protected MongoTemplate mongoTemplate;

    private String collectionName = "smm_image_info";

    public String getCollectionName() {
        return collectionName;
    }

    public void setCollectionName(String collectionName) {
        this.collectionName = collectionName;
    }

    public void queryOne(){

    }

    @Override
    public void save(T t) {
        mongoTemplate.save(t,collectionName);
    }



}
